
/* Otto DIY Web 控制台样式 */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    padding-bottom: 2rem;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
}

/* 状态卡片样式 */
.status-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.status-card .card-body {
    padding: 1.5rem;
}

.status-card h3 {
    font-size: 2rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

/* 控制面板样式 */
.control-pad {
    text-align: center;
    padding: 1rem;
}

.btn-control {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    margin: 5px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.btn-control:hover {
    transform: scale(1.1);
}

.btn-control:active {
    transform: scale(0.95);
}

.btn-action {
    width: 100%;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 舞步列表样式 */
.dance-list {
    max-height: 400px;
    overflow-y: auto;
}

.dance-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.dance-item:hover {
    background-color: #f8f9fa;
    border-color: var(--primary-color);
}

.dance-item .dance-name {
    font-weight: bold;
    color: var(--dark-color);
}

.dance-item .dance-info {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* 表单样式 */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 进度条样式 */
.progress {
    height: 8px;
    border-radius: 4px;
}

.progress-bar {
    border-radius: 4px;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: var(--light-color);
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    border-radius: 12px 12px 0 0 !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .status-card h3 {
        font-size: 1.5rem;
    }
    
    .btn-control {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .container-fluid {
        padding: 0.5rem;
    }
    
    .section {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .btn-control {
        width: 45px;
        height: 45px;
        font-size: 1rem;
        margin: 3px;
    }
    
    .status-card .card-body {
        padding: 1rem;
    }
    
    .status-card h3 {
        font-size: 1.25rem;
    }
}

/* 动画效果 */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

.status-updating {
    animation: pulse 1s infinite;
}

/* 连接状态指示器 */
.connection-status {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.connection-status.connected {
    background-color: var(--success-color);
    animation: pulse 2s infinite;
}

.connection-status.disconnected {
    background-color: var(--danger-color);
}

/* 自定义滚动条 */
.dance-list::-webkit-scrollbar {
    width: 6px;
}

.dance-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.dance-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.dance-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 文件上传区域 */
.upload-area {
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.upload-area:hover {
    background-color: rgba(0, 123, 255, 0.05);
    border-color: var(--primary-color);
}

.upload-area.dragover {
    background-color: rgba(0, 123, 255, 0.1);
    border-color: var(--primary-color);
}

/* 按钮组样式 */
.btn-group-custom {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-group-custom .btn {
    flex: 1;
    min-width: 80px;
}

/* 状态徽章 */
.badge {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 工具提示增强 */
.tooltip {
    font-size: 0.875rem;
}

/* 响应式表格 */
.table-responsive {
    border-radius: 8px;
}

/* 自定义开关 */
.form-switch .form-check-input {
    width: 3rem;
    height: 1.5rem;
}

.form-switch .form-check-input:checked {
    background-color: var(--success-color);
    border-color: var(--success-color);
}
